package com.chengqj;

import io.seata.spring.annotation.GlobalTransactionScanner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * Copyright © 2021年 tx-demo. All rights reserved.
 *
 * @author chengqj
 * TODO: 为了共建和谐社会，请为该类写点注释吧...
 * version 1.0.0 (接口必须带上)
 * @date 2021/3/28 14:26
 */
@SpringBootApplication
public class OrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    @Bean
    public GlobalTransactionScanner createGlobalTransactionScanner(){
        GlobalTransactionScanner globalTransactionScanner = new GlobalTransactionScanner("tcc-sample","my_test_tx_group");
        return globalTransactionScanner;
    }
}
